Overview

Project summary

Goals:

Findings:

Data Overview

Twitter data

Twitter data was obtained freely through a partnership between UCSB Library and Crimson Hexagon. Before downloading, the data was queried to meet the following conditions:

  1. Tweet came from the Santa Barbara area (add more details about how CH applies the location query)
  2. Only original tweets (no retweets)
  3. Date was marked between January 1, 2015 and December 31, 2019

Crimson Hexagon only allows 10,000 randomly selected tweets to be exported, manually, at a time in .xls format. Due to this restriction, data was manually downloaded for every 2 days in order to capture all tweets. There were around 5000 average number of daily tweets that met these conditions.

The Crimson Hexagon data did not contain all desired information, including whether or not the tweet was geotagged. To get this information we used the python twarc library to “rehydrate” the data using individual tweet ids and store the tweet information as .json files. From here we were able to remove all tweets that did not have a geotag, giving us a total of 82,876 tweets.

Table of data

Here is a sample of the type of the final twitter information we obtained.

created_at tweet_id full_text user_id user_location geo_type geo_coordinates language retweet_count favorite_count lat lon
Sun Jul 16 19:44:26 +0000 2017 8.866729e+17 Little throwback to a good weekend with my best friend ❤️ Women… https://t.co/g88jsCUEoq 603899764 NA Point c(34.41472222, -119.86055556) en 0 0 34.41472 -119.8606
Thu Jun 11 18:45:48 +0000 2015 6.090690e+17 The Santa Barbara zoo heard we were coming @suemcneel @PaisleyE @PapaCBryant http://t.co/te71EB15ok 243511111 Los Angeles, CA Point c(34.4187094, -119.6659806) en 0 1 34.41871 -119.6660
Tue Dec 27 03:43:43 +0000 2016 8.135912e+17 I’m at @TheLarkSb in Santa Barbara, CA https://t.co/dppc1BfmRw 2674675327 Miami, FL Point c(34.4146973, -119.69048875) en 0 0 34.41470 -119.6905
Thu Apr 02 01:06:06 +0000 2015 5.834352e+17 @maddow gays! What about discrimination on my he basis of race,gender or other grounds that would be covered be Indiana law. 107750911 Goleta Point c(34.42684843, -119.87725509) en 0 0 34.42685 -119.8773
Mon Mar 06 18:35:13 +0000 2017 8.388203e+17 Tune in tomorrow on @travelchannel bizarrefoods to see @andrewzimmern dive for sea creatures in… https://t.co/ARmOGbESkk 435354163 Santa Barbara, CA Point c(34.42149343, -119.61077387) en 0 0 34.42149 -119.6108
Sun Mar 12 23:36:28 +0000 2017 8.410704e+17 Just a lazy Sunday afternoon. Tea with girlfriends in my pineapple @dolcegabbana shoes #shoes… https://t.co/90HGYALhfG 885285924 world wide Point c(34.4337, -119.632) en 0 2 34.43370 -119.6320
Sat Dec 23 21:04:10 +0000 2017 9.446750e+17 How cute is new kid, HAMILTON! sb_dawg #sbdawg #adoptdontshop @ DAWG - Dog Adoption & Welfare Group https://t.co/F1yyqWRpDk 122980318 Santa Barbara, CA Point c(34.4383965, -119.8138275) en 2 1 34.43840 -119.8138
Fri Feb 01 17:37:46 +0000 2019 1.091390e+18 I took a tip from joelsartore and stalked this doorway for almost an hour until this girl walked out to get a shot of her cool pants. Sometimes pictures aren’t about timing as they are… https://t.co/5xyo6u89X9 24428202 Los Angeles, CA Point c(34.42000674, -119.69690592) en 0 0 34.42001 -119.6969
Mon Apr 25 21:31:04 +0000 2016 7.247124e+17 As long as there’s a kale salad with my fried chicken sandwich I’m totally going to feel guilt… https://t.co/7NgVd6BODI 41173620 Los Angeles Point c(34.42046328, -119.70282433) en 0 0 34.42046 -119.7028
Mon Jul 04 05:41:55 +0000 2016 7.498406e+17 Pre Croquet meeting of the minds. @ Birnam Wood Golf Club https://t.co/jaDBdOLe5s 96452845 Colorado Point c(34.43449138, -119.61061301) en 0 0 34.43449 -119.6106

The spatial distribution of tweets highlights areas of higher population density and tourist areas in downtown Santa Barbara. There is a single coordinate that has over 11,000 tweets reported across all years. It is near De La Vina between Islay and Valerio. There is nothing remarkable about this site so I assume it is the default coordinate when people tag “Santa Barbara” generally. The coordinate is 34.4258, -119.714.

Interactive with cluster markers

As you zoom in on the map, clusters will disaggregate. You can click on blue points to see the tweet.

Tweet density

This is log-transformed.

Identifying tourists and locals

This project aims to understand if and how preferences differ between tourists and locals for nature-based places within the Santa Barbara area. In order to test this we needed to come up with a way to identify tourists or locals. We used a two step process.

First, if the user has self-identified their location as somewhere in the Santa Barbara area, they are designated a local. This includes Carpinteria, Santa Barbara, Montecito, Goleta, Gaviota and UCSB. For the remainder, we use the number of times they have tweeted from Santa Barbara within a year to designate user type. If someone has tweeted across more than 2 months in the same year from Santa Barbara, they are identified as a local. This is consistent with how Eric Fischer determined tourists in his work. This is not fool-proof and there are instances were people visit and tweet from Santa Barbara more than two months a year, especially if they are visiting family or live within a couple hours driving distance.

There are 26408 tweets from tourists and 56468 tweets from locals.

The following map shows tweet log density by locals (top - blue) and tourists (bottom - red).

Identifying nature-based tweets

The full text of each tweet was analyzed to be either nature-based or not. We developed a coarse dictionary of words that indicate a nature-based tweet. These include natural features like ocean, coast, park, and works that indicate recreating (fishing, hiking, camping, etc.).

Note I had a hard time finding an ontology or lexicon that would fit this project. These are definitely skewed more towards nature and recreation rather than words like “home” or “connection”.

##  [1] "hike"        "trail"       "hiking"      "camping"     "tent"       
##  [6] "climb"       "summit"      "fishing"     "sail"        "sailing"    
## [11] "boat"        "boating"     "ship"        "cruise"      "cruising"   
## [16] "bike"        "biking"      "dive"        "diving"      "surf"       
## [21] "surfing"     "paddle"      "swim"        "ocean"       "beach"      
## [26] "^sea"        "sand"        "coast"       "island"      "wave"       
## [31] "fish"        "whale"       "dolphin"     "pacific"     "crab"       
## [36] "lobster"     "water"       "shore"       "marine"      "seawater"   
## [41] "lagoon"      "slough"      "saltwater"   "underwater"  "tide"       
## [46] "aquatic"     "^tree"       "^earth"      "weather"     "sunset"     
## [51] "sunrise"     "^sun"        "climate"     "park"        "wildlife"   
## [56] "^view"       "habitat"     "^rock"       "nature"      "mountains"  
## [61] "^peak"       "canyon"      "pier"        "wharf"       "environment"
## [66] "ecosystem"

Let’s look at some examples of what tweets qualified as “nature-based”.

kable(sample_n(nature_df %>% filter(nature_word == 1), 20)) %>%
  kable_styling(bootstrap_options = c("striped", "condensed"), font_size = 10, fixed_thead = T)
Month Day Time Year full_text user_id user_location geo_coordinates retweet_count favorite_count lat lon month_num date user_type nature_word
Aug 1 19:09:34 2016 sup’d from north end of isla vista beach to campus pt. where i caught a couple of small waves… https://t.co/qzqf5q0qfi 4.067427e+07 Santa Barbara, CA, USA c(34.40958704, -119.86076295) 0 1 34.40959 -119.8608 8 2016-08-01 local 1
Nov 13 17:10:50 2015 just waiting for el ni~no as i enjoy water. @ hendry’s beach https://t.co/f6cmhgpyzu 1.274346e+08 Santa Barbara, CA c(34.4035492, -119.7438889) 0 0 34.40355 -119.7439 11 2015-11-13 local 1
Mar 4 02:23:04 2016 hey sb, thanks for welcoming me with a sunset. #home @ santa barbara (california, west coast) https://t.co/nq5eouk6qj 1.012049e+08 Austin, TX c(34.42186796, -119.6638639) 0 0 34.42187 -119.6639 3 2016-03-04 local 1
Jul 20 23:52:50 2019 brandon and barbara’s wedding #dj @djewrek spins the reception and out #harpist valerie plays the ceremony #livemusicians #santabarbaraspremiereevententertainment @ rancho dos pueblos https://t.co/puw3om1sgz 3.404782e+08 Santa Barbara, CA c(34.44139635, -119.96477936) 0 1 34.44140 -119.9648 7 2019-07-20 local 1
Jan 5 03:31:09 2017 working hard on amazing 5 years in the making. the gaviota coast. the family is in the… https://t.co/qevsy48axt 2.547257e+07 NA c(34.42015781, -119.68942523) 0 0 34.42016 -119.6894 1 2017-01-05 local 1
Mar 11 20:01:39 2019 faouzi taieb is student-athlete playing soccer for university of california- santa barbara. he comes from marseille, france 🇫🇷🔥⚽️🎓🇺🇸 . . . . . . . . . . . #usasoccer #scholarships… https://t.co/iw8vvscktg 7.482370e+17 Moscow, Russia c(34.41815961, -119.86825051) 0 0 34.41816 -119.8683 3 2019-03-11 tourist 1
Mar 29 22:26:44 2015 overhearing parents on the beach talk to their kids, there’ll be a whole new generation who will need inner child work. #benice #kidsmatter 2.186338e+07 Detroit-Ojai,CA-Denver-Ojai CA c(34.39354747, -119.52515608) 0 0 34.39355 -119.5252 3 2015-03-29 local 1
Aug 23 23:21:04 2016 spectacular panoramic ocean, island and city views complement this gated mediterranean oasis of… https://t.co/srfjeixb40 3.241662e+09 Santa Barbara, CA c(34.4258, -119.714) 0 0 34.42580 -119.7140 8 2016-08-23 local 1
May 12 16:00:18 2017 when your friend parkour is a creep but it’s ok cuz he can take a decent photo #lingerer @… https://t.co/6y3cr28pis 7.053148e+07 The Clouds c(34.441815, -119.821008) 0 0 34.44181 -119.8210 5 2017-05-12 local 1
Dec 19 21:21:26 2018 happy winter break! since you just wrapped up fall qtr, it’s time to start thinking about summer internships-gorman, eureka, marc applications all due february 17, 2019!!! info on website… https://t.co/blnkzbvlad 3.321704e+09 NA c(34.41319691, -119.84620464) 1 2 34.41320 -119.8462 12 2018-12-19 local 1
May 5 00:13:13 2019 #repost livenotessb with get_repost ・・・ @rocioysusonora playing brew & taco fest at chase palm park. @ozomatli playing next! #livenotessb #livemusic #musicforthesoul #thingstodoaroundtown… https://t.co/dtqprjro1j 4.123875e+07 Los Angeles,Ca. c(34.41493619, -119.68425591) 0 1 34.41494 -119.6843 5 2019-05-05 tourist 1
Oct 29 00:07:27 2016 may this bring you #peace #skystribe…. @ butterfly beach, montecito https://t.co/ysorwfjy3y 1.891650e+09 San Diego, CA c(34.41688874, -119.64330522) 0 0 34.41689 -119.6433 10 2016-10-29 local 1
Oct 3 20:42:07 2016 just posted a photo @ santa barbara beach pier haror https://t.co/kstnmr9cmh 3.460478e+07 Colombia c(34.41020429, -119.68666792) 0 0 34.41020 -119.6867 10 2016-10-03 tourist 1
May 5 01:21:53 2017 i got a new bike! i’ve had my beach cruiser since 1992, and though i still love it, there are… https://t.co/ijpksyk8x7 8.615220e+08 Ventura, CA c(34.4405, -119.814) 0 0 34.44050 -119.8140 5 2017-05-05 local 1
Aug 29 22:23:48 2015 right before she chased a german shepard. #momentruiner #waytogo #beachdays #santabarbara… https://t.co/ojqnz2gqz2 4.244243e+08 NA c(34.41717805, -119.64214325) 0 0 34.41718 -119.6421 8 2015-08-29 tourist 1
Feb 26 07:26:45 2019 santa barbara sunsets 🌅 #santabarbara #sunset @ four seasons resort the biltmore santa barbara https://t.co/fst1bmd1vc 1.699582e+07 Scottsdale, AZ c(34.41758, -119.64196) 0 1 34.41758 -119.6420 2 2019-02-26 tourist 1
May 29 00:18:50 2017 ✨framily✨thanks fessparkerresort for capturing this detail from yesterday’s wedding! calligraphy… https://t.co/knee0cgjca 9.474294e+07 Santa Barbara c(34.41677158, -119.67710903) 0 0 34.41677 -119.6771 5 2017-05-29 local 1
Jun 3 19:31:05 2015 you haven’t seen the latest episode of the #funsparkledrama show then click the link in the profile!!… https://t.co/sbgjxuufh4 7.106343e+07 Los Angeles, CA c(34.423527, -119.668448) 0 2 34.42353 -119.6684 6 2015-06-03 local 1
May 14 02:48:58 2017 american heart association heart ball with my special date candysap 💖 @ coral casino beach and… https://t.co/g476azfuuz 1.960178e+08 Santa Barbara County, CA c(34.4164, -119.64126) 0 0 34.41640 -119.6413 5 2017-05-14 local 1
Jul 10 18:25:57 2016 the pups are getting more adventurous. 👍🏼🌊☀️ @ hendry’s off leash dog beach https://t.co/ed96yfnfcu 2.817670e+08 Calabasas, CA c(34.40271255, -119.74270825) 0 0 34.40271 -119.7427 7 2016-07-10 tourist 1

Where are nature-based tweets?

After identifying nature-based tweets we can take a look at where these tweets are coming from and compare to the general pattern of tweets.

nature_sf <- nature_df %>%
  st_as_sf(coords = c("lon", "lat")) %>%
  st_set_crs(4326)

hex_tweet_count_nature <- hex_grid %>%
  mutate(tweet_count = lengths(st_intersects(hex_grid, nature_sf %>% filter(nature_word == 1))),
         log_tweet_count = log(tweet_count))

#color palettes
greens = colorRampPalette(c("#E5F5E0", "#00441B"))

m <- mapview(hex_tweet_count_nature %>% filter(tweet_count > 0), 
        zcol = "log_tweet_count", 
        layer.name = "# Nature tweets (log)",
        col.regions = greens) 

m@map %>% setView(lng = -119.714, lat = 34.426, zoom = 12)

Who is tweeting nature-based tweets?

Not surprisingly there are less nature-based tweets than nature-based. Of all tweets, % are nature-based.

Of local tweeters, 13.7643962% of tweets are nature-based. Of tourists, 21.716904% are nature-based.

Are tweets in protected areas more often nature-based?

California Protected Areas Database

We can use the CPAD data to identify protected areas. [expandon CPAD here]

How many tweets come from these areas?

Count how many points in each polygon (all types of tweets not just nature based)

Some of these areas overlap with high tourist areas (e.g. the Zoo and Wharf). Let’s look at the content of these tweets to see how often tweets coming from these locations are nature-based or not.

Compare occurrence of nature vs non-nature based tweets

There is no site with less than 50% of tweets being nature-based.


Time

Timeline of tweets

Initial hypothesis was identifying spikes in nature-based tweets around three significant events: - Refugio oil spill in 2015 - Thomas fire in 2017 - Debris flow in 2018

Word clouds

top 100 words for locals vs tourist. And we could do this in space. At sterns wharf what are people tweeting about? At Elings, what are locals tweeting about?

Maybe in word clouds we can see some changes due to natural events

All of SB

By area

Sentiment Analysis

Lessons learned

Data is harder to find

Future research

Looking at different scale areas

There might be an interesting comparison between rural-suburban-urban areas. We hypothseize that the tourist/local alignment would split in urban areas, maybe aligned in suburban (like SB) and maybe not exist in rural.

Proportion of words that are nature based tells you how people. In Santa Barbara, there will be a lot of nature-based sense of place. In Manhattan, we wouldn’t expect to see nature based ones so much.

In a blog piece we can pose questions that we couldn’t answer but stuff like “can proportion of tourists/locals in place engagement tell us anything”.

Could compare % nature based tweets in SB to other areas. If we did this across the whole state, what proportion% are nature based? Maybe on average its just 5%.

Where and why do locals and tourists overlap in their use of area. SB seems to have a high alignment of tourists/locals, which may be helpful for local policy. Maybe places with distinct differences in how tourists/locals use places.

Look at cities of different coastal sizes rural - small town - urban - mega city. Could see how tourists/locals patterns differentiate across scale.

Is there a threshold of tourists where locals don’t go anymore?

In areas where we see both tourists and locals engaging, what characteristics do we see?

Quantifying transitions between rural to city.

Talk about overall social media literature for conservation and how this project is similar/different and used lessons from those papers to guide this analysis.